package com.lengchangjing.ConstructionalPatterns.FactoryPattern.AbstractFactoryPattern;

public class Client {
    public static void main(String[] args) {
        AbstractProdcutA productA;
        AbstractProdcutB productB;

        AbstractFactory factory = new ConcreteFactory1();
        productA = factory.CreateProductA();
        productB = factory.CreateProductB();
        productA.DoSomething();
        productB.DoSomething();

        factory = new ConcreteFactory2();
        productA = factory.CreateProductA();
        productB = factory.CreateProductB() ;
        productA.DoSomething();
        productB.DoSomething();
    }
}
